package com.xing.utils;

import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * 分页工具类
 * @version 1.0
 * @Author Xing
 * @Date 2023/8/6 9:14
 */
@Data
public class PageData<T> implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 总记录数
     */
    private int total;
    /**
     * 列表数据
     */
    private List<T> list;

    public PageData(List<T> list, long total) {
        this.list = list;
        this.total = (int) total;
    }
}


